package cn.itsource.service.impl;

import cn.itsource.domain.Emp;
import cn.itsource.mapper.DeptMapper;
import cn.itsource.mapper.EmpMapper;
import cn.itsource.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Service //创建本类对象并交给spring容器管理
//@Repository //持久层
//@Component //通用的
//helloServiceImpl
public class HelloServiceImpl implements HelloService {
    @Autowired
    private EmpMapper empMapper;

    @Override
    public List<Emp> hello() {
        return empMapper.findAll();
    }
}
